<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <link rel="stylesheet" href="/css/register.css">

</head>
<body>
    <form action="https://404060p9q5.zicp.fun/register" method="post">
        <div id="register-box">
            <span>欢迎注册</span>
            <div class="tips">
                <label class="form-label" id="tips">已有账号？<a href="https://404060p9q5.zicp.fun/loginIndex">点击登录</a></label><br>
                <!-- @TODO 记得修改公网地址-->
            </div>
            <div class="form">
<!--                <div class="radio-inline">-->
<!--                    <label class="form-label">请选择您的身份</label>-->
<!--                    <label class="idRadio">-->
<!--                        <input value="1" type="radio" name="idRadioOption" id="voter" required><label for="voter">投票人</label>-->
<!--                    </label>-->
<!--                    <label class="idRadio">-->
<!--                        <input value="2" type="radio" name="idRadioOption" id="candidate" required><label for="candidate">候选人</label>-->
<!--                    </label>-->
<!--                    <label class="idRadio">-->
<!--                        <input value="3" type="radio" name="idRadioOption" id="notary" required><label for="notary">公证人</label>-->
<!--                    </label>-->
<!--                </div>-->
                <div class="item">
                    <label class="form-label" for="name">昵称</label>
                    <input name="nickname" id="name" class="form-input" type="text" placeholder="请输入昵称"required/><br>
                </div>
                <div class="item">
                    <label class="form-label" for="email">邮箱</label>
                    <input name="email" id="email" class="form-input" type="email" placeholder="请输入邮箱" required/><br>
                </div>
                <div class="item">
                    <label class="form-label" for="password">密码</label>
                    <input name="password" id="password" class="form-input" type="password" placeholder="请输入密码" required/><br>
                </div>
                <div class="item">
                    <label class="form-label" for="verificationcode">验证码</label>
                    <input name="verifyCode" id="verificationcode" class="form-input" type="text" placeholder="请输入验证码" />
                </div>
                <input id="btn" type="submit" value="注册">
            </div>
        </div>
        <div class="tip">
            <p>{{.}}</p> <!--  @TODO 修改回显位置-->
        </div>
    </form>
    <a onclick="getVerifyCode()">
        <button>获取验证码</button>
    </a>
    <script>
        function getVerifyCode(){
            const mail = document.getElementById("email").value;
            const url = "https://404060p9q5.zicp.fun/sendVerifyCode?mail=" + mail// @TODO 修改公网地址
            alert(url)
            const Http = new XMLHttpRequest()
            Http.open("GET", url)
            Http.send(mail)
        }
    </script>
</body>
</html>